<?php
/*
 * 行情列表页
 * @package    auto
 * @author     WL
 * @copyright  Copyright (c) 2013 ixdcw team
 * @version    $Id: 3652f082153da03fecae120b22c90c293449c3e6 $
 */
defined('IN_IXDCW') or exit('Access Denied');
require DT_CORE . '/' . $module . '/common.inc.php';
login();

include load('misc.lang');
$headerPart = 'owners';
require_once MD_ROOT . '/header.inc.php';


$ownersCategory = AutoOwners::category();

$table     = Table::name(Table::NAME_OWNERS);

$pagesize  = 3;

$condition = " amid like '%".$modelid."%' and {$table}.areaid!=0 ";

if ($areaid) {
	$condition .=  $ARE['child'] ? " AND {$table}.areaid IN (".$ARE['arrchildid'].") " : " AND {$table}.areaid=$areaid ";
}



$total = $db->count(Table::name(Table::NAME_OWNERS), $condition);


$do = new OwnersModule($moduleid);
$do->setUsername($_username);
$areainfo = $do->getOne();

if(!$areainfo['zuobiao'] ||  !$areainfo['arbid']){
	Prompt::message($L['make_owners'], url('member/my').'?mid=32');
};

$userInfo = $do->getOneArea($modelid);

if ($total) {
	$ownersSummary=$do->getList($condition,'',$pagesize);
}

include template('ownersList', $module);













